Skip to content

Conversation

daroot
Copy link

@daroot daroot commented Aug 29, 2025

  • per-process description that displays in the UI
  • global and per-process log_configuration, including rotation
  • global and per-process vars for supporting Go template expansion on configs
  • env_cmds allows running host commands to populate env variables
  • ordered_shutdown controls the order of process shutdown
  • is_strict does additional checking on configuration files at startup
  • disable_env_expansion to not propagate .env variables to processes
  • http_get.{headers,status_code} and working_dir for probe commands
  • replicas to run multiple copies of processes
  • entrypoint alternate to command
  • is_elevated for sudo/runas priviledged processes
  • extends,is_disabled,is_dotenv_disabled for multi-file fragments and overrides.
  • launch_timeout_seconds for daemon processes

…1.7.3

- per-process `description` that displays in the UI
- global and per-process `log_configuration`, including `rotation`
- global and per-process `vars` for supporting Go template expansion on configs
- `env_cmds` allows running host commands to populate env variables
- `ordered_shutdown` controls the order of process shutdown
- `is_strict` does additional checking on configuration files at startup
- `disable_env_expansion` to not propagate .env variables to processes
- `http_get.{headers,status_code}` and `working_dir` for probe commands
- `replicas` to run multiple copies of processes
- `entrypoint` alternate to `command`
- `is_elevated` for sudo/runas priviledged processes
- `extends,is_disabled,is_dotenv_disabled` for multi-file fragments and overrides.
- `launch_timeout_seconds` for daemon processes

This comment was marked as off-topic.

@srid
Copy link
Member

srid commented Sep 23, 2025

@shivaraj-bh Does this look good to be merged?


disable_env_expansion = mkOption {
type = types.nullOr types.bool;
default = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed here setting this to true would be more appropriate and sane. It should be highlighted in the README\docs as it would diverge from PCs default

Copy link
Contributor

@adrian-gierakowski adrian-gierakowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also add all env vars from here to here:

environment = mkOption {
default = { };
description = "Environment variables to pass to process-compose binary.";
type = types.submodule {
options = {
PC_DISABLE_TUI = mkOption {
type = types.nullOr types.bool;
default = null;
description = "Disable the TUI (Text User Interface) of process-compose";
};

Copy link
Contributor

@adrian-gierakowski adrian-gierakowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are also some missing flags here, like disable-dotenv

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not inline this where the option is defined?

(Aside: I am not sure if this is even useful for nix-based configuration, IIUC let-bindings in nix make these redundant)

Comment on lines +136 to +145
extends = mkOption {
type = types.nullOr types.path;
default = null;
example = "process-compose.base.yaml";
description = ''
Make the current configuration inherit all values in the given file.
See https://f1bonacc1.github.io/process-compose/merge#configuration-inheritance-with-extends
'';
};
Copy link
Contributor

@shivaraj-bh shivaraj-bh Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant? Nix’s module system (by design) allows us to do this?

This and the vars comment makes me think: do we have to create options for every setting to replicate upstream? How about we make settings a freeform module? This should allow us to keep the API small (limited to what’s actually needed), while allowing users to still be able to set settings that are not defined.

Copy link
Contributor

@adrian-gierakowski adrian-gierakowski Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's nice to have typed and documented options, although it increases maintenance burden
but what's annoying is not being able to easily configure stuff which has not been explicitly added yet, so maybe we could have extraEnvironment for na extraOptions (for flags) in which people could pass arbitrary untyped config? It would be similar to pattern use in nixos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regarding extends: might be useful for peoaple gradually migrating from multi-yaml configs, but we could warn in description that it's not advised when used with nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants